package com.bmob.lover.viewmodel.request

import com.theone.common.ext.formatDate
import com.theone.common.ext.logI
import com.bmob.lover.data.model.bean.Anniversary
import com.bmob.lover.data.model.bean.BmobDate
import com.bmob.lover.viewmodel.base.BaseBmobActionViewModel

class AnniversaryAddActionViewModel:BaseBmobActionViewModel<Anniversary>(){

    fun save(name:String,date:String,type:Int){
       val bean =  Anniversary().apply {
           setLoverPointer()
           this.name = name
           this.date = BmobDate(date.formatDate())
           this.type = type
        }
        bean.save()
    }

}